package cn.hnevc.chengziyang;



public class Example51 {
	public static void main(String[] args) {
		Dog1 dog1=new Dog1();
		dog1.shout();	
	}
	

}
class Animal1{
	void shout(){
		System.out.println("动物发出叫声");
	}
	
}
class Dog1 extends Animal1{
	//对父类中的shout()方法重写
	void shout(){
		System.out.println("汪汪汪~~~");
	}
}
